The present invention relates to a computer for forming a table by selecting a program language mode during a table mode.
Along with widespread development of personal computers, a computer is commercially available which can form a table (i.e., spreadsheet) by entering table format data, e.g., data for the number or records, the number of items and number of digit positions, and table data, e.g., items to be written in the table whose format is defined by the table format data, which are required for forming the table by the computer.
"VisiCalc", "multiplan" and "Super Calc", which are respectively available from Viscorp, Microsoft and SORCIM, are well-known spreadsheet programs.
Various drawbacks are presented in the application of these programs. First, when a table, shown in FIG. 1, is to be formed, subtotal data for each column or row can be easily calculated. However, more complex calculations than the above-mentioned calculation cannot be performed. Second, when calculations are performed for any columns or rows in a single table in accordance with different calculation formulas and the resultant data are located in different blocks, it is difficult to determine which calculation formula was used to derive the resultant data located in a predetermined block. For example, in the table shown in FIG. 1, when the calculation formula is given as EQU RC3=RC1+RC2[IT4] (1)
a sum of data written in a block "b", given by RC1 (RECORD1) and IT4 (ITEM4), and data written in a block "c", given by RC2 and IT4, is written in a block "a", given by RC3 and IT4. In this manner, when one calculation formula is used in formation of a single table, calculations are simple. However, assume that a plurality of calculation formulas are used to form a single table, as follows: EQU RC3=RC1+RC2[IT2-IT4] (2) EQU IT4=IT2+IT3[RC1-RC2] (3) EQU IT4=IT2+IT3[RC2-RC3] (4)
it is difficult to check which calculation formula was used to derive data written in a predetermined block.
Third, when a plurality of tables are formed, the respective tables are independently formed. Even if the first and second tables are formed in accordance with the same calculation formulas, the calculation formulas must be established for each individual table. It is impossible to shift data written in a block in the first table to a block in the second table or to form a third table by using data written in the first and second tables. A calculation program (hereafter referred to as a calc program) is proposed to solve the first problem and to perform complex calculations and constitutes a subroutine part of the main program. However, the subroutine is regarded as a jump in the same program, so the number of functions of the table or spreadsheet program is increased, thereby complicating the application of the program. On the other hand, since a program language such as FORTRAN or BASIC is used in general-purpose computers, complex calculations can be performed. However, in practice, a floppy disk of a program language is set in a floppy disk drive to load the program language into the computer so as to perform complex calculations. In the table mode, a floppy disk of a table program must be set in the floppy disk drive to load the table program in place of the program language. As a result, the program language cannot be loaded in the table mode.
On the other hand, it is known that different program languages can be simultaneously used in accordance with time sharing or multiprograming. However, these programs are independently executed. In other words, these programs neither have any correlation therebetween nor are subjected to selection as to when they are needed. Therefore, even if time sharing or multiprograming is used, the program language cannot be used to perform complex calculations for the blocks of the table in the table mode.